/**
 * Created on 2007-03-06 22:53
 */
package game;

import game.media.gfx.RenderManager;

/**
 * @author David Wallin
 */
public abstract class BlockComponent
{
	public enum States
	{
		NORMAL,
		HIGHLIGHTED
	}
	
	/**
	 * The block components x position in a matris unknown to this block component
	 */
	private int					m_MatrisXpos;
	/**
	 * The block components y position in a matris unknown to this block component
	 */
	private int					m_MatrisYpos;
	/**
	 * For optimization
	 */
	protected RenderManager		m_RenderManager = RenderManager.INSTANCE;
	
	/**
	 * Constructor of the BlockComponent, only called as super() from derived class
	 * 
	 * @param x x coordinate in the matris of this component
	 * @param y y coordinate in the matris of this component
	 */
	public BlockComponent(int x, int y)
	{
		m_MatrisXpos = x;
		m_MatrisYpos = y;
		
		//BlockComponentManager.INSTANCE.addBlockComponent(this);
	}
	
	/**
	 * Removes this BlockComponent from its owner if there is one
	 */
	public void remove()
	{
		//BlockComponentManager.INSTANCE.removeBlockComponent(this);
	}
	
	/**
	 * Gets the member m_MatrisXpos
	 * 
	 * @return m_MatrisXpos
	 */
	public int getMatrisXpos()
	{
		return m_MatrisXpos;
	}
	
	/**
	 * Gets the member m_MatrisYpos
	 * 
	 * @return m_MatrisYpos
	 */
	public int getMatrisYpos()
	{
		return m_MatrisYpos;
	}
	
	/**
	 * Sets the x position of this block component in a matris unknown to this object
	 * 
	 * @param matrisXpos The x position to set
	 */
	public void setMatrisXpos(int matrisXpos)
	{
		m_MatrisXpos = matrisXpos;
	}
	
	/**
	 * Sets the y position of this block component in a matris unknown to this object
	 * 
	 * @param matrisYpos The y position to set
	 */
	public void setMatrisYpos(int matrisYpos)
	{
		m_MatrisYpos = matrisYpos;
	}
	
	public abstract void display(boolean display);
	
	public abstract void setState(States state);
	
	public abstract void setMatris(Matris matris);
}
